/*
 * Copyright Thoughtworks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Buttons.css
 */

/* Buttons grouping */
.form_buttons {
  padding: 8px;
  margin-bottom: 10px;
  background-color: #999;
  background-repeat: repeat-x;
  background-position: center center;
  border-radius: 6px;
  border: 0;
}

.form_buttons button,
.form_buttons a.link_as_button {
  height: 27px;
}

.form_buttons button.submit:hover,
.form_buttons button.submit_hover,
.form_buttons a.link_as_button_hover {
  height: 27px;
}

.admin_wrapper .form_buttons {
  margin: 10px 0 0 0;
}

button,
a.link_as_button {
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: visible; /* removes extra side padding in IE */
  font-weight: normal;
  line-height: 13px; /* button defaults to 13, need to set both so they look the same/fixes height issue */
}

button::-moz-focus-inner,
a.link_as_button::-moz-focus-inner {
  border: none;  /* overrides extra padding in Firefox */
}

button span,
a.link_as_button span {
  position: relative;
  display: block;
  white-space: nowrap;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  /* Safari and Google Chrome only - fix margins */
  button span,
  a.link_as_button span {
    margin-top: -1px;
  }
}

/* shared all buttons */
input[type="submit"],
input[type="submit"]:hover,
button.submit,
button.submit:hover,
button.submit_hover,
a.link_as_button,
a.link_as_button:hover,
a.link_as_button_hover,
button.submit.disabled,
button.submit.disabled:hover,
button.submit.disabled_hover,
input.submit,
input.submit:hover,
input.submit_hover,
input.submit.disabled,
input.submit.disabled:hover,
input.submit.disabled_hover,
a.link_as_button.disabled,
a.link_as_button.disabled:hover {
  padding: 6px 8px;
  margin-left: 5px;
  text-align: center;
  background: #444 image_url("g9/backgrounds/overlay_gradient_button.png") repeat-x bottom left;
  color: #fff;
  border-radius: 4px;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 20%);
  font-size: 11px;
  text-transform: uppercase;
}

#job_actions button.submit { /* styling for the jobs listing tab rerun button */
  margin-bottom: 10px;
}

#config_save_actions button.primary {
  padding: 2px 5px;
  margin-right: 5px;
  text-align: center;
  border-radius: 4px;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 20%);
  font-size: 11px;
  color: white;
  text-transform: uppercase;
}

#config_save_actions button.primary {
  padding: 2px 5px;
  margin-right: 5px;
  text-align: center;
  border-radius: 4px;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 20%);
  font-size: 11px;
  color: white;
  text-transform: uppercase;
}

#config_save_actions button.primary {
  padding: 5px 10px;
  margin-right: 5px;
  text-align: center;
  border-radius: 4px;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 20%);
  font-size: 11px;
  color: white;
  text-transform: uppercase;
}

.form_buttons button.submit {
  min-width: 120px;
}

button.submit_small,
button.submit_small:hover {
  padding: 4px 6px;
}

a.link_as_button {
  float: left;
}

button.submit,
a.link_as_button {
  color: #fff;
}


button.submit span,
a.link_as_button span {
  padding: 0;
  color: #fff;
  font-size: 11px;
  height: auto;
  background: none;
}

button.submit:hover,
button.submit_hover,
a.link_as_button:hover,
a.link_as_button_hover { /* the redundant class is used to apply the hover state with a script */
  background-color: #666;
  color: #fff;
  height: auto;
}

button.submit:hover span,
button.submit_hover span,
a.link_as_button:hover span,
a.link_as_button_hover span {
  padding: 0;
  color: #fff;
  height: auto;
}

a.reset_button {
  float: left;
}

button.submit.disabled,
button.submit.disabled:hover {
  cursor: default;
  background-color: #ccc;
}

button.submit.disabled:hover span {
  padding: 0;
  height: auto;
}

button.submit.disabled span,
a.link_as_button.disabled span,
a.link_as_button.disabled span:hover,
a.link_as_button_hover.disabled span {
  color: #fff;
  text-shadow: -1px -1px 1px #aaa;
}

/* Select Button (drop down) styles */
button.submit span img,
button.submit:hover span img,
button.submit_hover span img {
  position: relative;
  top: -1px;
  margin-left: 7px;
  margin-right: -2px;
}

input[type="submit"] {
  min-width: 100px;
  box-sizing: border-box;
  line-height: 11px;
  padding: 6px 8px;
  margin: 0;
  border: 0 none;
  text-align: center;
  border-radius: 4px;
  font-size: 11px;
  color: white;
  text-transform: uppercase;
  height: 25px;
  cursor: pointer;
}

input[type="submit"]:hover {
  padding: 6px 8px;
  margin-left: 0;
  background-color: #666;
}

input[type="submit"].primary,
.buttons-group .primary {
  background-color: #39c;
}

input[type="submit"].primary:hover,
.buttons-group .primary:hover {
  background-color: #52b3e3;
}

input[type="submit"][disabled="disabled"] {
  opacity: 0.5;
  filter: alpha(opacity=50);
  cursor: default;
}

input[type="submit"][disabled="disabled"].primary:hover {
  background-color: #39c !important;
}

